This page last changed on Jan 15, 2008 by jspiegel.

eDocs Home > BEA AquaLogic Data Services Platform 3.0 Documentation > Data Services Developer's Guide

Variable Usage Rules

This section describes how variables may be used when customizing an update map expression. If you are new to update maps, it is recommended that you first read Understanding Update Maps.

Variable Types and Scoping Rules

Variables may be defined by a for-each block or by an update block (as an output variable). An output variable may be used in an expression if the expression is contained within an update block that depends on the update block that defines the variable. A for each block variable may be used by an expression if the expression is inside the for-each block that defines the variable. However, if the defining for-each block contains any other for each blocks which also contain the expression, the variable may not be used in the expression.

insert example here

These restrictions are in place to prevent unintuitive or complicated behavior by the update map at runtime. If these rules are too restrictive for your application, you may want to consider using XQSE. However, there is one exception to the for each block variable usage rule. If the variable is use as part of a path expression that references a key value then usage is valid as long as the expression is within the defining block.

insert example here

Updating Foreign Key Values

The function fn-bea:coalesce-equal takes 1 or more arguments and simply returns the first argument that is not empty. The automatically generated update map may use fn-bea:coalesce-equal



Contact BEA | Feedback | Privacy | (c) 2008 BEA Systems

Document generated by Confluence on Jan 15, 2008 11:02